package com.zyc.studentstudy.utils

import android.text.Editable
import android.text.TextWatcher

/**
 * Created by zhangyuncai on 2021/10/16.
 */
abstract class SimpleTextWatcher : TextWatcher {
    override fun afterTextChanged(s: Editable) {
    }

    override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {
    }

    override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
        textChange(if (s == null) "" else s.toString() + "")
    }

    abstract fun textChange(content: String?)
}
